const { DataTypes } = require('sequelize');
const sequelize = require('../config/database');

const ReceiptInfo = sequelize.define('receipt_info', {
  receipt_id: {
    type: DataTypes.STRING(32),
    allowNull: false,
    primaryKey: true,
    comment: '签领表编号'
  },
  user_id: {
    type: DataTypes.STRING(32),
    allowNull: false,
    comment: '签领人用户编号'
  },
  receipt_status: {
    type: DataTypes.ENUM('未签领', '已签领'),
    allowNull: false,
    defaultValue: '未签领',
    comment: '签领状态'
  },
  receipt_date: {
    type: DataTypes.DATEONLY,
    comment: '签领日期'
  }
}, {
  tableName: 'receipt_info',
  timestamps: true,
  createdAt: 'create_time',
  updatedAt: 'update_time'
});

module.exports = ReceiptInfo; 